#include <gtest/gtest.h>
#include <async_logger/logger.hpp>
#include <async_logger/log_manager.hpp>
#include <async_logger/log_level.hpp>
#include <async_logger/log_module.hpp>

class LoggerTest : public ::testing::Test {
protected:
    void SetUp() override {
        logManager.init("TestProcess");
        logger.setLogLevel(LogLevel::DEBUG);
    }

    void TearDown() override {
        // Cleanup if necessary
    }

    Logger logger;
    LogManager logManager;
};

TEST_F(LoggerTest, LogMessage) {
    logger.log(LogLevel::INFO, "This is an info message.");
    // Verify that the message was logged correctly
}

TEST_F(LoggerTest, SetLogLevel) {
    logger.setLogLevel(LogLevel::ERROR);
    // Verify that the log level is set correctly
}

TEST_F(LoggerTest, RollLogIfNeeded) {
    // Simulate log rolling condition and verify it works
    logManager.rollLogIfNeeded();
    // Check if logs are rolled as expected
}